<?php
session_start();
include_once( "./sql/sqlCon.php" );
require('./account/usersConfigs.php');
$refPage = "index.php";
include( "langincluder.php" );
$stringsIndexPage = $strings;

$page = (int)( $_GET['p'] ? $_GET['p'] : 0 );
$includePath = "";
switch( $page )
{
	case 200 : $includePath = "./account/login.php"; break;
	case 201 : $includePath = "./account/register.php"; break;
	
	case 601 : $includePath = "./newsCMS/newsCMSCreator.php"; break;
	case 602 : $includePath = "./newsCMS/newsCMSUpdater.php"; break;
	case 603 : $includePath = "./newsCMS/newsCMSDeleter.php"; break;
	
	case 801 : $includePath = "./uploader/lister.php"; break;
	default : $includePath = "./newsCMS/newsCMS.php";
	
}


?>

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1251">
<title></title>

<style type="text/css">
html
{
	height : 100%;
} 
body
{
	font-family : Arial, Helvetica,sans-serif;
	font-size : 12px;
	height : 100%;
	padding : 0px;
	margin : 0px;
	background : #D7D7D7;
}


.outer
{
	overflow : hidden;
	min-height : 95%; /* some space for the footer */
	width : 760px;
	margin : 0px auto; 
}
.lefty
{
	float : left;
	background-image : url('./lefty.jpg');
	background-repeat : repeat-y;
	width : 80px;
}
.righty
{
	float : right;
	background-image : url('./righty.jpg');
	background-repeat : repeat-y;
	width : 80px;
}
.mainCont
{
	padding-left : 80px;
	width : 600px; /* 760 - 2*80 */
	background : #E6E6E6;
}

.mainCont, .lefty, .righty
{
	padding-bottom: 32767px;
	margin-bottom: -32767px;
}



.header
{
	width : 100%;
	height : 100px;
	border-style : solid;
}
.underHeaderInfo
{
	/*width : 500px;*/
	text-align : right;
	padding : 2px;
}
.footer
{
	overflow : hidden;
	text-align : center;
	width : 760px;
	margin : 0 auto;
	min-height : 5%;
	background : #E6E6E6;
}
.footerlefty
{
	float : left;
	background-image : url('./lefty.jpg');
	width : 80px;
}
.footerrighty
{
	float : right;
	background-image : url('./righty.jpg');
	width : 80px;
}
.footerlefty, .footerrighty
{
	padding-bottom: 200px;
	margin-bottom: -200px;
}
.menu
{
	padding : 6px;
	width : 115px;
	float : left;
}
.content
{
	border-left-style : dashed;
	border-width : 1px;
	border-color : #999999;
	width : 460px;
	padding : 6px;
	float : right;
	overflow : auto;
}

.menu div
{
	display : none; 
	text-align : right; 
	margin : 5px; 
	border : dotted; 
	border-width : 1px;
	padding : 2px 4px;
}
.menu div:hover
{
	background-color : #D2D2D2;
}
.menu div.expandBox a
{
	font-size : 100%;
}
.mainCont a
{
	cursor : pointer;
	font-size : 115%;
}
a
{
	color : #000000;
	text-decoration : none;
}
a:hover
{
	border-style : none none solid none;
	border-width : 1px;
	border-color : #AAA;
}
.content a
{
	text-decoration : underline;
}

input, textarea
{
	background-color : #f0f0f0;
}

button
{
	background : #DADADA; 
	color : #555;
	padding : 0px 2px 0px 2px;
	margin : 2px 0px;
	border : 1px #FFF solid;
}
button.onThis
{
	background : #AAA; 
	color : #555;
	padding : 0px 2px 0px 2px;
	margin : 2px 0px;
	border : 1px #FFF solid;
}
button:hover
{
	background : #EEE;
	border-color : #ffaaaa;
}


.entry
{
}
.entryTitle
{
	font-weight : bold;
	font-size : 130%;
}
.entryDate
{
	font-size : 80%;
	padding-left : 10px;
}
.entryEdit
{
	padding-left : 10px;
	
}
.entryContent
{
	padding : 3px 10px 3px 15px;
	background-color : #DADADA;
}
.entryContent:hover
{
	background-color : #EEE;
}
.entryLink
{
	padding-right : 10px;
	text-align : right;
	font-size : 80%;
}

.additionalInfo
{
	font-size : 80%;
	color : #333;
	padding : 0px 3px;
	max-width : 100%;
}

.unrem a
{
	color : #555;
	font-size : 90%;
}
</style>

<script type="text/javascript">
var watermarkColor = "#999999";
</script>

</head>
<body>


<div class="outer">

<div class="lefty"></div>
<div class="righty"></div>

<div class="mainCont">
<div class="header"> header goes here </div>
<div class="underHeaderInfo"><?php if(!empty($_SESSION['userName'])) echo $stringsIndexPage['loggedInAs']." <span style='font-weight:bold; font-size:120%;'>".$_SESSION['userName']."</span>&nbsp;&nbsp;&nbsp;<span class='unrem'><a href='?p=200'>[logout]</a></span>"; 
																else echo "<a href='?p=200' style='border-bottom:solid 1px #aaa'>".$stringsIndexPage['notLoggedIn']." login here</a>"; ?>&nbsp;</div>

<div class="menu">
<?php include("menu.php"); ?>
</div>

<div class="content">

<?php include( $includePath ); ?>

</div>

</div>
</div>

<div class="footer">
<div class="footerlefty"></div>
<div class="footerrighty"></div>
footer goes here <?php echo ""; ?>
</div>


</body>
</html>